package com.cci.kangdao.cipapi;

import com.cci.kangdao.cipFleet.dto.request.CipFleetAndEsnRequest;
import com.cci.kangdao.cipFleet.dto.request.CipFleetCreateRequest;
import com.cci.kangdao.cipFleet.dto.request.CipFleetUpdateRequest;
import com.cci.kangdao.cipFleet.dto.response.CipEntityResponse;
import com.cci.kangdao.cipFleet.dto.response.CipHealthCheckResponse;
import com.cci.kangdao.cipFleet.dto.response.CipPhcEntityResponse;
import com.cci.kangdao.cipFleet.dto.response.CipSuccessResponse;
import com.cci.kangdao.model.FuelBehaviorRecommedInfo;
import org.springframework.scheduling.annotation.Async;

import java.util.List;

/**
 * @ClassName CipServiceApi
 * @Description APP与cip系统Api接口列表
 * @Author 商伟
 * @Date 2022/08/03 11:09 AM
 * @Version 1.0
 **/
public interface CipServiceApi {

	/**
	 * 同步esn
	 * @param action 同步类型
	 * @param esnList
	 * @return
	 */
	@Async
	public void synchronizationEsn(String action, List<String> esnList,String businessNo);

	/**
	 * 获取esn
	 * @param esn
	 * @return
	 */
	public CipResponeEntity getEsnInfo(String esn);

	/**
	 * 绑车数据至芯管家后台
	 * @param request
	 * @return
	 */
	@Async
	public void syncBindVehicle(FleetAndEsnRelationRequest request,Long userId);

	//更新芯管家管理员
	@Async
	void updateXgjFleetUserId(Long userId,Long stationId);

	//添加芯管家管理员
	@Async
	void addXgjFleetUserId(Long userId,Long stationId);

	/**
	 * 添加车队
	 * @param request
	 * @return
	 */
	public CipSuccessResponse fleetCreate(CipFleetCreateRequest request);

	/**
	 * 修改车队
	 * @param request
	 * @return
	 */
	public CipEntityResponse fleetUpdate(CipFleetUpdateRequest request);

	/**
	 * 删除车队
	 * @param request
	 * @return
	 */
	public CipEntityResponse fleetDel(CipFleetUpdateRequest request);


	/**
	 * 添加车队同步cip
	 * @param request
	 * @return
	 */
	public CipSuccessResponse fleetAddCip(CipFleetAndEsnRequest request);

	/**
	 * 修改车队同步cip
	 * @param request
	 * @return
	 */
	public CipEntityResponse fleetUpdateCip(CipFleetAndEsnRequest request);

	/**
	 * 删除车队同步cip
	 * @param fleetId
	 * @return
	 */
	public CipEntityResponse fleetDeleteCip(String fleetId,String serviceChannel,Long userId);

	/**
	 * 调用cip返回车辆健康评分
	 * @param esn
	 * @return
	 */
	public CipHealthCheckResponse getCipHealthCheck(String esn);

	/**
	 * 调用cip同步油耗驾驶行为建议信息
	 * @param info
	 * @return
	 */
	@Async
	public CipPhcEntityResponse syncFuelBehaviorRecommed(FuelBehaviorRecommedInfo info);

	/**
	 * 调用activity添加新手活动
	 * @param userId
	 * @return
	 */
	@Async
	public void addNeophyteUser(Long userId);

	/**
	 * 调用activity完成新手活动
	 * @param taskCode
	 * @return
	 */
	@Async
	public void finishNeophyteTaskUser(String taskCode, String params, String userid,String authorization);

	CipRespone getPostDataByCipUrl(VipRequest request);
}
